package house;

import java.sql.ResultSet;
import java.sql.SQLException;

public class House {
	public int id;
	public String source="";
	public String title="";
	public String time="";
	public String pay="";
	public String payStyle="";
	public String houseStyle="";
	public String rentStyle="";
	public String style="";

	public String area="";
	public String decoration="";
	public String direction="";
	public String floor="";
	public String community="";
	public String location="";
	public String installation="";
	public String contactMan="";
	public String contactWay="";
	public String company="";
	public String subCompany="";
	public String houseDetails="";
	public String url="";
	public String crawlTime=""; 
	public int picNum=0;
	
	public String code="";
	   
	public House(){
		   
	}
	   
	public House(ResultSet resultSet){
		try {
			this.id=resultSet.getInt("id");
			this.source=resultSet.getString("来源");
			this.title=resultSet.getString("标题");
			this.crawlTime=resultSet.getString("抓取时间");
			this.time=resultSet.getString("发布时间");
			this.pay=resultSet.getString("租金");
			this.payStyle=resultSet.getString("押付方式");
			this.houseStyle=resultSet.getString("户型");
			this.rentStyle=resultSet.getString("租凭方式");
			this.style=resultSet.getString("房屋类型");
			this.area=resultSet.getString("面积");
			this.decoration=resultSet.getString("装修");
			this.direction=resultSet.getString("朝向");
			this.floor=resultSet.getString("楼层");
			this.community=resultSet.getString("小区");
			this.location=resultSet.getString("位置");
			this.installation=resultSet.getString("配置");
			this.contactMan=resultSet.getString("联系人");
			this.contactWay=resultSet.getString("联系方式");
			this.houseDetails=resultSet.getString("房源描述");
			this.url=resultSet.getString("URL");
			this.picNum=resultSet.getInt("图片数");
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
}
